/*
 * XML Type:  ETypedElement
 * Namespace: http://www.eclipse.org/emf/2002/Ecore
 * Java type: org.eclipse.emf.x2002.ecore.ETypedElement
 *
 * Automatically generated - do not modify.
 */
package org.eclipse.emf.x2002.ecore.impl;
/**
 * An XML ETypedElement(@http://www.eclipse.org/emf/2002/Ecore).
 *
 * This is a complex type.
 */
public class ETypedElementImpl extends org.eclipse.emf.x2002.ecore.impl.ENamedElementImpl implements org.eclipse.emf.x2002.ecore.ETypedElement
{
    private static final long serialVersionUID = 1L;
    
    public ETypedElementImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName ORDERED$0 = 
        new javax.xml.namespace.QName("", "ordered");
    private static final javax.xml.namespace.QName UNIQUE$2 = 
        new javax.xml.namespace.QName("", "unique");
    private static final javax.xml.namespace.QName LOWERBOUND$4 = 
        new javax.xml.namespace.QName("", "lowerBound");
    private static final javax.xml.namespace.QName UPPERBOUND$6 = 
        new javax.xml.namespace.QName("", "upperBound");
    private static final javax.xml.namespace.QName MANY$8 = 
        new javax.xml.namespace.QName("", "many");
    private static final javax.xml.namespace.QName REQUIRED$10 = 
        new javax.xml.namespace.QName("", "required");
    private static final javax.xml.namespace.QName ETYPE$12 = 
        new javax.xml.namespace.QName("", "eType");
    
    
    /**
     * Gets the "ordered" attribute
     */
    public boolean getOrdered()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ORDERED$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(ORDERED$0);
            }
            if (target == null)
            {
                return false;
            }
            return target.getBooleanValue();
        }
    }
    
    /**
     * Gets (as xml) the "ordered" attribute
     */
    public org.eclipse.emf.x2002.ecore.EBoolean xgetOrdered()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EBoolean target = null;
            target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().find_attribute_user(ORDERED$0);
            if (target == null)
            {
                target = (org.eclipse.emf.x2002.ecore.EBoolean)get_default_attribute_value(ORDERED$0);
            }
            return target;
        }
    }
    
    /**
     * True if has "ordered" attribute
     */
    public boolean isSetOrdered()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(ORDERED$0) != null;
        }
    }
    
    /**
     * Sets the "ordered" attribute
     */
    public void setOrdered(boolean ordered)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ORDERED$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ORDERED$0);
            }
            target.setBooleanValue(ordered);
        }
    }
    
    /**
     * Sets (as xml) the "ordered" attribute
     */
    public void xsetOrdered(org.eclipse.emf.x2002.ecore.EBoolean ordered)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EBoolean target = null;
            target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().find_attribute_user(ORDERED$0);
            if (target == null)
            {
                target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().add_attribute_user(ORDERED$0);
            }
            target.set(ordered);
        }
    }
    
    /**
     * Unsets the "ordered" attribute
     */
    public void unsetOrdered()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(ORDERED$0);
        }
    }
    
    /**
     * Gets the "unique" attribute
     */
    public boolean getUnique()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(UNIQUE$2);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(UNIQUE$2);
            }
            if (target == null)
            {
                return false;
            }
            return target.getBooleanValue();
        }
    }
    
    /**
     * Gets (as xml) the "unique" attribute
     */
    public org.eclipse.emf.x2002.ecore.EBoolean xgetUnique()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EBoolean target = null;
            target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().find_attribute_user(UNIQUE$2);
            if (target == null)
            {
                target = (org.eclipse.emf.x2002.ecore.EBoolean)get_default_attribute_value(UNIQUE$2);
            }
            return target;
        }
    }
    
    /**
     * True if has "unique" attribute
     */
    public boolean isSetUnique()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(UNIQUE$2) != null;
        }
    }
    
    /**
     * Sets the "unique" attribute
     */
    public void setUnique(boolean unique)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(UNIQUE$2);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(UNIQUE$2);
            }
            target.setBooleanValue(unique);
        }
    }
    
    /**
     * Sets (as xml) the "unique" attribute
     */
    public void xsetUnique(org.eclipse.emf.x2002.ecore.EBoolean unique)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EBoolean target = null;
            target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().find_attribute_user(UNIQUE$2);
            if (target == null)
            {
                target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().add_attribute_user(UNIQUE$2);
            }
            target.set(unique);
        }
    }
    
    /**
     * Unsets the "unique" attribute
     */
    public void unsetUnique()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(UNIQUE$2);
        }
    }
    
    /**
     * Gets the "lowerBound" attribute
     */
    public int getLowerBound()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(LOWERBOUND$4);
            if (target == null)
            {
                return 0;
            }
            return target.getIntValue();
        }
    }
    
    /**
     * Gets (as xml) the "lowerBound" attribute
     */
    public org.eclipse.emf.x2002.ecore.EInt xgetLowerBound()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EInt target = null;
            target = (org.eclipse.emf.x2002.ecore.EInt)get_store().find_attribute_user(LOWERBOUND$4);
            return target;
        }
    }
    
    /**
     * True if has "lowerBound" attribute
     */
    public boolean isSetLowerBound()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(LOWERBOUND$4) != null;
        }
    }
    
    /**
     * Sets the "lowerBound" attribute
     */
    public void setLowerBound(int lowerBound)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(LOWERBOUND$4);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(LOWERBOUND$4);
            }
            target.setIntValue(lowerBound);
        }
    }
    
    /**
     * Sets (as xml) the "lowerBound" attribute
     */
    public void xsetLowerBound(org.eclipse.emf.x2002.ecore.EInt lowerBound)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EInt target = null;
            target = (org.eclipse.emf.x2002.ecore.EInt)get_store().find_attribute_user(LOWERBOUND$4);
            if (target == null)
            {
                target = (org.eclipse.emf.x2002.ecore.EInt)get_store().add_attribute_user(LOWERBOUND$4);
            }
            target.set(lowerBound);
        }
    }
    
    /**
     * Unsets the "lowerBound" attribute
     */
    public void unsetLowerBound()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(LOWERBOUND$4);
        }
    }
    
    /**
     * Gets the "upperBound" attribute
     */
    public int getUpperBound()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(UPPERBOUND$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(UPPERBOUND$6);
            }
            if (target == null)
            {
                return 0;
            }
            return target.getIntValue();
        }
    }
    
    /**
     * Gets (as xml) the "upperBound" attribute
     */
    public org.eclipse.emf.x2002.ecore.EInt xgetUpperBound()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EInt target = null;
            target = (org.eclipse.emf.x2002.ecore.EInt)get_store().find_attribute_user(UPPERBOUND$6);
            if (target == null)
            {
                target = (org.eclipse.emf.x2002.ecore.EInt)get_default_attribute_value(UPPERBOUND$6);
            }
            return target;
        }
    }
    
    /**
     * True if has "upperBound" attribute
     */
    public boolean isSetUpperBound()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(UPPERBOUND$6) != null;
        }
    }
    
    /**
     * Sets the "upperBound" attribute
     */
    public void setUpperBound(int upperBound)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(UPPERBOUND$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(UPPERBOUND$6);
            }
            target.setIntValue(upperBound);
        }
    }
    
    /**
     * Sets (as xml) the "upperBound" attribute
     */
    public void xsetUpperBound(org.eclipse.emf.x2002.ecore.EInt upperBound)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EInt target = null;
            target = (org.eclipse.emf.x2002.ecore.EInt)get_store().find_attribute_user(UPPERBOUND$6);
            if (target == null)
            {
                target = (org.eclipse.emf.x2002.ecore.EInt)get_store().add_attribute_user(UPPERBOUND$6);
            }
            target.set(upperBound);
        }
    }
    
    /**
     * Unsets the "upperBound" attribute
     */
    public void unsetUpperBound()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(UPPERBOUND$6);
        }
    }
    
    /**
     * Gets the "many" attribute
     */
    public boolean getMany()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MANY$8);
            if (target == null)
            {
                return false;
            }
            return target.getBooleanValue();
        }
    }
    
    /**
     * Gets (as xml) the "many" attribute
     */
    public org.eclipse.emf.x2002.ecore.EBoolean xgetMany()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EBoolean target = null;
            target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().find_attribute_user(MANY$8);
            return target;
        }
    }
    
    /**
     * True if has "many" attribute
     */
    public boolean isSetMany()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(MANY$8) != null;
        }
    }
    
    /**
     * Sets the "many" attribute
     */
    public void setMany(boolean many)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MANY$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(MANY$8);
            }
            target.setBooleanValue(many);
        }
    }
    
    /**
     * Sets (as xml) the "many" attribute
     */
    public void xsetMany(org.eclipse.emf.x2002.ecore.EBoolean many)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EBoolean target = null;
            target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().find_attribute_user(MANY$8);
            if (target == null)
            {
                target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().add_attribute_user(MANY$8);
            }
            target.set(many);
        }
    }
    
    /**
     * Unsets the "many" attribute
     */
    public void unsetMany()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(MANY$8);
        }
    }
    
    /**
     * Gets the "required" attribute
     */
    public boolean getRequired()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(REQUIRED$10);
            if (target == null)
            {
                return false;
            }
            return target.getBooleanValue();
        }
    }
    
    /**
     * Gets (as xml) the "required" attribute
     */
    public org.eclipse.emf.x2002.ecore.EBoolean xgetRequired()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EBoolean target = null;
            target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().find_attribute_user(REQUIRED$10);
            return target;
        }
    }
    
    /**
     * True if has "required" attribute
     */
    public boolean isSetRequired()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(REQUIRED$10) != null;
        }
    }
    
    /**
     * Sets the "required" attribute
     */
    public void setRequired(boolean required)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(REQUIRED$10);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(REQUIRED$10);
            }
            target.setBooleanValue(required);
        }
    }
    
    /**
     * Sets (as xml) the "required" attribute
     */
    public void xsetRequired(org.eclipse.emf.x2002.ecore.EBoolean required)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.eclipse.emf.x2002.ecore.EBoolean target = null;
            target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().find_attribute_user(REQUIRED$10);
            if (target == null)
            {
                target = (org.eclipse.emf.x2002.ecore.EBoolean)get_store().add_attribute_user(REQUIRED$10);
            }
            target.set(required);
        }
    }
    
    /**
     * Unsets the "required" attribute
     */
    public void unsetRequired()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(REQUIRED$10);
        }
    }
    
    /**
     * Gets the "eType" attribute
     */
    public java.lang.String getEType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ETYPE$12);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "eType" attribute
     */
    public org.apache.xmlbeans.XmlAnyURI xgetEType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlAnyURI target = null;
            target = (org.apache.xmlbeans.XmlAnyURI)get_store().find_attribute_user(ETYPE$12);
            return target;
        }
    }
    
    /**
     * True if has "eType" attribute
     */
    public boolean isSetEType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(ETYPE$12) != null;
        }
    }
    
    /**
     * Sets the "eType" attribute
     */
    public void setEType(java.lang.String eType)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ETYPE$12);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ETYPE$12);
            }
            target.setStringValue(eType);
        }
    }
    
    /**
     * Sets (as xml) the "eType" attribute
     */
    public void xsetEType(org.apache.xmlbeans.XmlAnyURI eType)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlAnyURI target = null;
            target = (org.apache.xmlbeans.XmlAnyURI)get_store().find_attribute_user(ETYPE$12);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlAnyURI)get_store().add_attribute_user(ETYPE$12);
            }
            target.set(eType);
        }
    }
    
    /**
     * Unsets the "eType" attribute
     */
    public void unsetEType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(ETYPE$12);
        }
    }
}
